home *** CD-ROM | disk | FTP | other *** search
- program test_8255;
- const
- PORT_A = $388;
- PORT_B = $389;
- PORT_C = $38A;
- CONTROL_LOC = $38B;
- var
- i,j,k: integer;
- begin
- port[CONTROL_LOC] := $84;
- repeat
- begin
- for j := 0 to maxint do
- begin
- port[PORT_A] := lo(j);
- port[PORT_B] := hi(j);
- i := port[PORT_A];
- k := port[PORT_B];
- if (hi(j) <> k) or (lo(j) <> i) then writeln('help'^G);
- end;
- end;
- writeln(k:6,i:6);
- until false;
- end.